package com.itheima.test3;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;

/**
 * @Author:gy
 * @Date: 2025/08/31 10:15
 * @Description:
 */
public class Demo1 {
    public static void main(String[] args) throws Exception {
          //字符缓冲流 关联到文件
        BufferedReader br = new BufferedReader(new FileReader("Day11\\c.txt"));
        //读取数据
        char [] ch = new char[1024];
        int len;
        while ((len = br.read(ch)) != -1) {
            System.out.print(new String(ch,0,len));
        }
        /*int ch;
        while ((ch= br.read())!=-1){
            System.out.println((char)ch);
        }*/
        br.close();
    }
}
